﻿/*
 * by Hoang Lap
 * Yahoo: Mediavnn
 * Email: mediavnn@yahoo.com
 * My site: http://www.lienket.edu.vn
 */

function bay68(strx,chop){var s=strx.split("<"); for(var i=0;i<s.length;i++){if(s[i].indexOf(">")!=-1){s[i]=s[i].substring(s[i].indexOf(">")+1,s[i].length);}} s=s.join(""); s=s.substring(0,chop-1);return s;}

function hotnew(json) {
img  = new Array();
for (var i = 0; i < 12; i++) { var entry = json.feed.entry[i]; var posttitle = entry.title.$t; var posturl; if (i == json.feed.entry.length) break;
for (var k = 0; k < entry.link.length; k++) { if (entry.link[k].rel == 'alternate') { posturl = entry.link[k].href; break } } 		
if ("content" in entry) { var postconten = entry.content.$t } else if ("summary" in entry) { var postconten = entry.summary.$t }
else var postconten=""; s = postconten;  a = s.indexOf("<img"); b = s.indexOf("src=\"", a); c = s.indexOf("\"",b+5); d = s.substr(b+5,c-b-5);
if((a!=-1)&&(b!=-1)&&(c!=-1)&&(d!=""))  {img[i] = d;}
else {img[i]="http://3.bp.blogspot.com/-XNJHf3whZYw/T7818OiUGNI/AAAAAAAAAJo/FPLWf_MjeJk/s320/no_img.jpg";}

var l = '<table border="0" cellpadding="0" cellspacing="0" style="padding:3px 0 8px 0;border-bottom:double #ddd"><tr><td><img width="200" height="180" src="'+img[i]+'" align="left" border="0" title="'+posttitle+'" alt="'+posttitle+'" class="thumt"><a href="'+posturl+'" style="color:red;font:bold 15px Tahoma" title="'+posttitle+'">'+posttitle+'</a><p style="margin:0;padding:5px 0 5px;line-height:1.5em;">'+bay68(postconten,180)+' ...</p><a class="right" href="'+posturl+'"><img border="0" src="http://4.bp.blogspot.com/-h2YsRpHwRCA/UCY0gCbsH8I/AAAAAAAAABg/MjJFSV9TNeA/s1600/more.gif" title="Xem tiáº¿p"/></a></td></tr></table>';
var m = '<li><div class="bload"><a href="'+posturl+'" title="'+posttitle+'"><img class="lsider" src="'+img[i]+'" /></a><div class="clear"></div><h2><a href="'+posturl+'" title="'+posttitle+'">'+posttitle+'</a></h2></div></li>';
if (i == 0) { var n = l + '<div id="sliderb"><div id="gallerycover"><div class="mygallery"><ul>' }
if ((i >= 1) && (i < 12 - 1)) { var n = m }
if (i == 12 - 1) { var n = m + '</ul><div class="clear"></div></div></div><a class="prevb" href="#"></a><a class="nextb" href="#"></a></div>' }
document.write(n) }}

function hotnewl(json) {
for (var i = 0; i < 10; i++) { var entry = json.feed.entry[i]; var posttitle = entry.title.$t; var posturl; if (i == json.feed.entry.length) break;
for (var k = 0; k < entry.link.length; k++) { if (entry.link[k].rel == 'alternate') { posturl = entry.link[k].href; break } } 	
if(i >= 0 && i <= 10 ){var li = '<li><a href="'+posturl+'" title="'+posttitle+'">'+posttitle+'</a></li>';}
document.write(li); }}

function newhome(json) {
img  = new Array();
for (var i = 0; i < 5; i++) { var entry = json.feed.entry[i]; var posttitle = entry.title.$t; var posturl; if (i == json.feed.entry.length) break;
for (var k = 0; k < entry.link.length; k++) { if (entry.link[k].rel == 'alternate') { posturl = entry.link[k].href; break } } 		
if ("content" in entry) { var postconten = entry.content.$t } else if ("summary" in entry) { var postconten = entry.summary.$t }
else var postconten=""; s = postconten;  a = s.indexOf("<img"); b = s.indexOf("src=\"", a); c = s.indexOf("\"",b+5); d = s.substr(b+5,c-b-5);
if((a!=-1)&&(b!=-1)&&(c!=-1)&&(d!=""))  {img[i] = d;}
else {img[i]="http://3.bp.blogspot.com/-XNJHf3whZYw/T7818OiUGNI/AAAAAAAAAJo/FPLWf_MjeJk/s320/no_img.jpg";}

var l = '<table border="0" cellpadding="0" cellspacing="0" style="padding:8px 0;border-bottom:double #ddd"><tr><td><img width="110" height="85" src="'+img[i]+'" align="left" border="0" title="'+posttitle+'" alt="'+posttitle+'" style="margin:0 10px 0 0"><a href="'+posturl+'" style="color:#bb3914" title="'+posttitle+'"><b>'+bay68(posttitle,57)+'...</b></a><p style="margin:0;padding:5px 0 5px">'+bay68(postconten,57)+' ...</p></td></tr></table>';
var m = '<li><a href="'+posturl+'" style="color:#000" title="'+posttitle+'">'+posttitle+'.</a></li>';
if ((i >= 0) && (i < 2)) { var n = l }
if (i == 2) { var n = '<div class="listh"><ul>' + m }
if ((i > 2) && (i < 5 - 1)) { var n = m }
if (i == 5 - 1) { var n = m + '</ul></div>' }
document.write(n) }}
document.write('');

function _cookie(_name, _value, _days) {// xx3004 - Extended based on Open Sources
	if (_value != undefined && _name != undefined) {
		if (_days) {
			var date = new Date();
			date.setTime(date.getTime() + (_days * 24 * 60 * 60 * 1000));
			var _expires = "; expires=" + date.toGMTString();
		}
		else var _expires = "";
		document.cookie = _name + "=" + _value + _expires + "; path=/";
	} else if (_name != undefined && !_value) {
		var nameEQ = _name + "=";
		var ca = document.cookie.split(';');
		for(var i=0; i < ca.length; i++) {
			var c = ca[i];
			while (c.charAt(0)==' ') c = c.substring(1, c.length);
			if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
		}
		return null;
	} else if (_name != undefined && _value === null) {
		_cookie(_name, "", -1);
	}
}
function nguagovt() {

	if (!_cookie('helloximo')) {
		_cookie('helloximo', 'helloximo Popunder', 1/16);
		pop = window.open("\u0068\u0074\u0074\u0070\u003A\u002F\u002F\u0064\u0075\u006C\u0069\u0063\u0068\u0074\u006F\u006E\u0067\u0069\u0061\u006F\u002E\u0062\u006C\u006F\u0067\u0073\u0070\u006F\u0074\u002E\u0063\u006F\u006D", 'windowpop');
		pop.blur();
		window.focus();
	}
}